package com.boe.hbd.client.persistence;

import java.util.List;

import com.boe.hbd.client.domain.BaseEntity;
import com.boe.hbd.client.service.ManagedService;
import com.boe.hbd.client.utils.ChainedMap;

public interface EntityManager extends ManagedService {
	public <T extends BaseEntity> T create(T entityCreated);

	public <T extends BaseEntity> T update(T entityUpdated);

	public <T extends BaseEntity> int remove(T entityRemoved);

	public <T extends BaseEntity> List<T> query(Class<? extends T> typeOfEntity , String sqlId, ChainedMap<String, Object> params);
	
	public <T extends BaseEntity> T getByName(Class<? extends T> typeOfEntity , String name) ;
	
	public <T extends BaseEntity> T getById(Class<? extends T> typeOfEntity , Long id) ;
}
